package weekimwee.cn.x5nightdemo

import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.PopupWindow
import android.widget.TextView

/**
 * Created by Wee Kim Wee on 2017/11/17.
 */
class FontSizePop(context: Context, itemOnClick: View.OnClickListener): PopupWindow(){
    init {
        val inflater: LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
        val view = inflater.inflate(R.layout.xiao_zhong_da,null)
        val redView : TextView = view.findViewById(R.id.xiao)
        val yellowView : TextView = view.findViewById(R.id.zhong)
        val greenView : TextView = view.findViewById(R.id.da)
        redView.setOnClickListener(itemOnClick)
        yellowView.setOnClickListener(itemOnClick)
        greenView.setOnClickListener(itemOnClick)
        contentView = view
        width = ViewGroup.LayoutParams.WRAP_CONTENT
        height = ViewGroup.LayoutParams.WRAP_CONTENT
        isFocusable = true
        isOutsideTouchable =true
        animationStyle = R.style.CirclePopAnim
        setBackgroundDrawable(BitmapDrawable())
    }


}